﻿using RockBus.DataContracts;
using System;
using System.ServiceModel;
using System.ServiceModel.Description;

namespace RockBus.Transport.Interfaces
{
    public interface IServiceEndpointFactory
    {
        Type GetContractType(EndpointInfo endpointInfo);

        ContractDescription GetContractDescription(EndpointInfo endpointInfo);

        string GetScheme(EndpointInfo endpointInfo);

        string GetBindingConfigurationName(EndpointInfo endpointInfo);
        Uri GetAbsoluteUri(EndpointInfo endpointInfo, Uri[] serviceHostBaseAddresses);
        ServiceEndpoint CreateDynamicServiceEndpoint(ServiceHost serviceHost, EndpointInfo endpointInfo, SecurityMode defaultSecurityMode = SecurityMode.None);
        ServiceEndpoint CreateDynamicServiceEndpoint(ServiceHost serviceHost, EndpointInfo endpointInfo, Uri[] baseAddresses, SecurityMode defaultSecurityMode = SecurityMode.None);
    }
}